package com.InheritInterface;

/**
 * ClassName: Test
 * Package:
 * Description:
 *
 * @Author 软件232班——欧阳昊淼
 * @Create 2024/9/9 18:21
 * @Version 17.0.2
 */
public class Test {
    public static void main(String[] args) {
        FootBaller Baller = new FootBaller();
        Baller.learnEnglish();

        CollegeStudent Student = new CollegeStudent();
        Student.learnEnglish();
        Student.learnComputerScience();

        System.out.println("--------------------------------------------------------");

        Sportsman kb = new BasketballPlayers(10, 24, "Kobe",
                "后卫/小前锋", "湖人队");
        System.out.println(kb);

        Student pupil = new Pupil("六年级", 20230001, "小明");
        System.out.println(pupil);

        Sportsman footBaller = new Sportsman();
        footBaller.setName("C罗");
        footBaller.setHeight(1.88);
        footBaller.setPosition("前锋");
        footBaller.setTeam("皇家马德里");
        System.out.println(footBaller);
    }

    static class FootBaller implements LearnEnglish {

        @Override
        public void learnEnglish() {
            System.out.println("作为世界杯的常驻队员，我应该学习英语。");
        }
    }

    static class CollegeStudent implements LearnEnglish,LearnComputerScience {
        @Override
        public void learnEnglish() {
            System.out.println("我要考过英语四级就要学习英语知识");
        }

        @Override
        public void learnComputerScience() {
            System.out.println("我要考过计算机四级就要学习计算机知识");
        }
    }
}
